package cn.zebra.dev.shop.module.delivery.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 运费模板(主表)
 *
 * @author runnable
 */
@TableName("delivery")
@Getter
@Setter
public class DeliveryEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("发布店铺(0:代表通用-不可修改;非0代表店铺私有模板)")
    private Long shopId;

    @ApiModelProperty("计费方式(0:按件数;1:按重量)")
    private Integer deliveryType;

    @ApiModelProperty("模板名称")
    private String deliveryName;

    @ApiModelProperty("排序(数字越小越靠前)")
    private Long sort;

    @ApiModelProperty("是否删除")
    private Boolean deleteFlag;

    @ApiModelProperty("创建人")
    private Long createId;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("修改人")
    private Long updateId;

    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<DeliveryItemEntity> itemList;
}
